/*******************************************************************************************
 *  ActionRef.h
 *
 *  Creating and managing ActionRef object structures.
 *
 *******************************************************************************************/







/*******************************************************************************************
 *  INCLUDES :
 *******************************************************************************************/
#include "BulletMLConsts.h"
#include "BulletMLTypes.h"
#include "Action.h"







/*******************************************************************************************
 *  TYPE definitions :
 *******************************************************************************************/

/*****************************************************/
/* The ACTIONREF object structure :                 */
/*****************************************************/
#ifndef _ACTIONREF_STRUCT_
#define _ACTIONREF_STRUCT_
typedef struct ActionRef {

	ObjType		otype;						/* The object's type, as in the ... */
											/* ... BML type enum.               */

	char		*label;						/* The label of the refered action. */
	Action		*action;					/* Pointer to the refered action.   */

	int			paramsNum;					/* How many parameters?             */
	
	/* The parameters the refered ... */
	/* ... bullet might need.         */
	char		params[MAX_PARAMS][MAX_EXPRESSION_STR_LEN];

} ActionRef;
#endif







/*******************************************************************************************
 *  Function PROTOTYPES :
 *******************************************************************************************/

/* CONSTRUCTOR and DESTRUCTOR : */
ActionRef	*newActionRef(void);			/* Creates an empty ActionRef object structure. */
void 		freeActionRef(ActionRef *a);	/* Destroys an ActionRef object structure.      */ 


/* FILLING the ActionRef object structure : */
void 		setActionRefLabel(ActionRef *a, char *l);
void 		pushActionRefParam(ActionRef *a, char *p);
